import win32com.client as win32
from PIL import ImageGrab

excel = win32.gencache.EnsureDispatch('Excel.Application')
wb = excel.Workbooks.Open('D:/pics/t1.xlsx')
ws = wb.Sheets('标准9')

for i, shape in enumerate(ws.Pictures()):
    shape.Copy()  # 复制图片到剪贴板
    image = ImageGrab.grabclipboard()  # 从剪贴板获取图片
    image.save(f'D:/pics/image{i}.png')

wb.Close()
excel.Quit()